import 'package:flutter/material.dart';
import '../../model/aiModels.dart';


class AiModelItem extends StatelessWidget {
  AiModelItem(this.model, {Key? key}) : super(key: key);
  AiModel model;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 5),
      decoration: BoxDecoration(),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          const Icon(
            Icons.add_chart_outlined,
            size: 50,
          ),
          const SizedBox(width: 10),
          Expanded(
              child: Column(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                model.name ?? '',
                style: const TextStyle(
                  color: Colors.black,
                  fontSize: 18,
                  fontWeight: FontWeight.w600,
                ),
              ),
              const SizedBox(height: 5),
              Text(
                model.desc ?? '',
                style: const TextStyle(
                  color: Color(0xff222222),
                  fontSize: 13,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(height: 5),
              Row(
                children: [
                  const Icon(
                    Icons.person,
                    size: 15,
                    color: Color(0xffbbbbbb),
                  ),
                  const SizedBox(width: 5),
                  Text(
                    model.from ?? '',
                    style: const TextStyle(
                      color: Color(0xffbbbbbb),
                      fontSize: 12,
                      fontWeight: FontWeight.normal,
                    ),
                  ),
                  const SizedBox(width: 5),
                  const Icon(
                    Icons.local_fire_department,
                    size: 15,
                    color: Color(0xffbbbbbb),
                  ),
                  const SizedBox(width: 5),
                  Text(
                    '${((model.hot ?? 0) / 10000.0).toStringAsFixed(1)}w',
                    style: const TextStyle(
                      color: Color(0xffbbbbbb),
                      fontSize: 12,
                      fontWeight: FontWeight.normal,
                    ),
                  ),
                ],
              )
            ],
          ))
        ],
      ),
    );
  }
}
